<%@ Control Language="C#" AutoEventWireup="true" Codebehind="ClassListControl.ascx.cs"
    Inherits="ASP_TF2LogParser.UserControls.ClassListControl" %>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
    <Columns>
        <asp:TemplateField HeaderText="Class" SortExpression="ClassLongName">
            <ItemTemplate>
                <asp:Label runat="server" Text='<%# GenerateClassUrl( Eval("ClassLongName").ToString(), Eval("ClassId").ToString() ) %>'
                    ID="ClassLabel"></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Kills" HeaderText="Kills" ReadOnly="True" SortExpression="Kills" />
        <asp:TemplateField HeaderText="Kill %" SortExpression="KillDeathRatio">
            <ItemTemplate>
                <asp:Label runat="server" Text='<%# GetKillPercentage( Convert.ToInt32(Eval("Kills").ToString()) ) %>'
                    ID="KillPercentageLabel"></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Headshot %" SortExpression="Headshot Percentage">
            <ItemTemplate>
                <asp:Label runat="server" Text='<%# GetHeadshotPercentage( Eval("Kills").ToString(), Eval("ClassId").ToString() ) %>'
                    ID="HeadshotPercentageLabel"></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetClassStatsList"
    TypeName="LogParser.DA.ClassModel"></asp:ObjectDataSource>
